﻿using System;

namespace SilenthinkContract.Domain
{
    public static class ProductAttributeExtension
    {
        public static string GetProductAttributeType(this ProductAttributeType productAttributeType)
        {
            var result = String.Empty;
            switch (productAttributeType)
            {
                case ProductAttributeType.Normal: result = "普通属性"; break;
                case ProductAttributeType.Pivotal: result = "关键属性"; break;
                case ProductAttributeType.Sale: result = "销售属性"; break;
            }
            return result;
        }

        public static string GetProductAttributeControlType(this ProductAttributeControlType productAttributeControlType)
        {
            var result = String.Empty;
            switch (productAttributeControlType)
            {
                case ProductAttributeControlType.DropDownList: result = "下拉列表"; break;
                case ProductAttributeControlType.CheckBox: result = "复选框"; break;
            }
            return result;
        }

    }
}
